home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / GCC 1.37.1r15 / Machines / tm-apollo68.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-14  |  5.3 KB  |  180 lines  |  [TEXT/MPS ]

  1. /* Definitions of target machine for GNU compiler.  Apollo 680X0 version.
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #include "tm-m68k.h"
  21.  
  22. /* This symbol may be tested in other files for special Apollo handling */
  23.  
  24. #define TM_APOLLO
  25.  
  26. /* See tm-m68k.h.  7 means 68020 with 68881.  */
  27.  
  28. #ifndef TARGET_DEFAULT
  29. #define TARGET_DEFAULT 7
  30. #endif
  31.  
  32. /* Target switches for the Apollo is the same as in tm-m68k.h, except
  33.    there is no Sun FPA. */
  34.  
  35. #undef TARGET_SWITCHES
  36. #define TARGET_SWITCHES  \
  37.   { { "68020", 5},                \
  38.     { "c68020", 5},                \
  39.     { "68881", 2},                \
  40.     { "bitfield", 4},                \
  41.     { "68000", -5},                \
  42.     { "c68000", -5},                \
  43.     { "soft-float", -0102},            \
  44.     { "nobitfield", -4},            \
  45.     { "rtd", 8},                \
  46.     { "nortd", -8},                \
  47.     { "short", 040},                \
  48.     { "noshort", -040},                \
  49.     { "", TARGET_DEFAULT}}
  50.  
  51. /* Define __HAVE_68881__ in preprocessor,
  52.    according to the -m flags.
  53.    This will control the use of inline 68881 insns in certain macros.
  54.    Also inform the program which CPU this is for.  */
  55.  
  56. #if TARGET_DEFAULT & 02
  57.  
  58. /* -m68881 is the default */
  59. #define CPP_SPEC \
  60. "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\
  61. %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
  62.  
  63. #else
  64.  
  65. /* -msoft-float is the default */
  66. #define CPP_SPEC \
  67. "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\
  68. %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
  69.  
  70. #endif
  71.  
  72. /* Names to predefine in the preprocessor for this target machine.  */
  73. /* These are the ones defined by Apollo, plus mc68000 for uniformity with
  74.    GCC on other 68000 systems.  */
  75.  
  76. #define CPP_PREDEFINES "-Dapollo -Daegis -Dunix"
  77.  
  78. /* cpp has to support a #sccs directive for the /usr/include files */
  79.  
  80. #define SCCS_DIRECTIVE
  81.  
  82. /* Allow #ident but output nothing for it.  */
  83.  
  84. #define IDENT_DIRECTIVE
  85. #define ASM_OUTPUT_IDENT(FILE, NAME)
  86.  
  87. /* Allow dollarsigns in identifiers */
  88.  
  89. #define DOLLARS_IN_IDENTIFIERS 1
  90.  
  91. /* -m68000 requires special flags to the assembler.
  92.    The -C flag is passed to a modified GNU assembler to cause COFF
  93.    modules to be produced.  Remove it if you're not using this.
  94.    (See vasta@apollo.com.)  */
  95.  
  96. #define ASM_SPEC \
  97.  "-C %{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}"
  98.  
  99. /* STARTFILE_SPEC
  100.    Note that includes knowledge of the default specs for gcc, ie. no
  101.    args translates to the same effect as -m68881 */
  102.  
  103. #if TARGET_DEFAULT & 2
  104. /* -m68881 is the default */
  105. #define STARTFILE_SPEC                    \
  106.   "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  107. #else
  108. /* -msoft-float is the default */
  109. #define STARTFILE_SPEC                    \
  110.   "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  111. #endif
  112.  
  113. /* Specify library to handle `-a' basic block profiling.  */
  114.  
  115. #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \
  116. %{a:/usr/lib/bb_link.o} "
  117.  
  118. /* Debugging is not supported yet */
  119.  
  120. #undef DBX_DEBUGGING_INFO
  121. #undef SDB_DEBUGGING_INFO
  122.  
  123. /* Every structure or union's size must be a multiple of 2 bytes.  */
  124.  
  125. #define STRUCTURE_SIZE_BOUNDARY 16
  126.  
  127. /* Functions which return large structures get the address
  128.    to place the wanted value at offset 8 from the frame.  */
  129.  
  130. #undef  PCC_STATIC_STRUCT_RETURN
  131. #undef  STRUCT_VALUE_REGNUM
  132.  
  133. /* Caller treats address of return area like a parm.  */
  134. #define STRUCT_VALUE 0
  135.  
  136. #define STRUCT_VALUE_INCOMING \
  137.   gen_rtx (MEM, Pmode,                    \
  138.        gen_rtx (PLUS, SImode, frame_pointer_rtx,    \
  139.             gen_rtx (CONST_INT, VOIDmode, 8)))
  140.  
  141. /* Specify how to pad function arguments.
  142.    Arguments sizes < sizeof(int) are padded upward, and larger arguments
  143.    are not padded at all. */
  144.  
  145. #define FUNCTION_ARG_PADDING(mode, size)                \
  146.   (((mode) == BLKmode                            \
  147.     ? (GET_CODE (size) == CONST_INT                    \
  148.        && INTVAL (size) < PARM_BOUNDARY / BITS_PER_UNIT)        \
  149.     : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)                \
  150.    ? upward : none)
  151.  
  152. /* Short integral argument prototype promotion is not done */
  153.  
  154. #undef  PROMOTE_PROTOTYPES
  155.  
  156. /* The definition of this macro imposes a limit on the size of
  157.    an aggregate object which can be treated as if it were a scalar
  158.    object. */
  159.  
  160. #define MAX_FIXED_MODE_SIZE    BITS_PER_WORD
  161.  
  162. /* The definition of this macro implies that there are cases where
  163.    a scalar value cannot be returned in registers.
  164.    For Apollo, anything larger than one integer register is returned
  165.    using the structure-value mechanism, i.e. objects of DFmode are
  166.    returned that way. */
  167.  
  168. #define RETURN_IN_MEMORY(type) \
  169.   (GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)
  170.  
  171. /* This is how to output a reference to a user-level label named NAME.
  172.    In order to link to Apollo libraries, no underscore is prepended to names.
  173.    `assemble_name' uses this.  */
  174.  
  175. #undef  ASM_OUTPUT_LABELREF
  176. #define ASM_OUTPUT_LABELREF(FILE,NAME)    \
  177.   fprintf (FILE, "%s", NAME)
  178.  
  179.  
  180.